home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Storm
/
Scene Storm - Volume 1.iso
/
coding
/
asm
/
utils
/
fullwindow
/
fullwindow.s
Wrap
Text File
|
1980-01-03
|
2KB
|
81 lines
*
* Ten minute utilities proudly presents:
*
* A very short utility to increase the current window size to the full screen
* size, and changes the windows title to that given as argument
* E.g.
*
* FullWindow My favourite source disk
*
* Would change the window's title to 'My favourite source disk' and increase
* the windows size to the screen size
*
* Every time this is run, it uses a little memory to define the windows title
incdir df0:include
include exec/exec_lib.i
include exec/memory.i
include intuition/intuitionbase.i
include intuition/intuition_lib.i
include intuition/intuition.i
include intuition/screens.i
clr.b -1(a0,d0.w) Null terminate CLI arguments
move.l a0,-(sp) save argument for later = window title
move.l $4.w,a6 Allocate some memory for new CLI name
moveq #MEMF_ANY,d1
jsr _LVOAllocMem(a6)
move.l d0,a0
tst.l d0
beq.s .fail
move.l (sp)+,a1 Copy CLI name into this memory
.strcpy move.b (a1)+,(a0)+
bne.s .strcpy
move.l d0,-(sp) save new CLI name for later
move.l $4.w,a6 Open Intuition.library
lea IntName(pc),a1
jsr _LVOOldOpenLibrary(a6)
move.l d0,a6
tst.l d0
beq.s .fail
move.l ib_ActiveWindow(a6),a0 Move default window to (0,0)
move.w wd_LeftEdge(a0),d0
ext.l d0
neg.l d0 d0 = Pixels to move in X dir
move.w wd_TopEdge(a0),d1
ext.l d1
neg.l d1 d1 = Pixels to move in Y dir
jsr _LVOMoveWindow(a6)
move.l ib_ActiveWindow(a6),a0 Size window to full scren
move.l ib_ActiveScreen(a6),a1
move.w sc_Width(a1),d0
sub.w wd_Width(a0),d0
ext.l d0 d0 = value to increase width
move.w sc_Height(a1),d1
sub.w wd_Height(a0),d1
ext.l d1 d1 = value to increase height
jsr _LVOSizeWindow(a6)
move.l ib_ActiveWindow(a6),a0
move.l (sp),a1 new window title
move.w #-1,a2 retain old screen title
jsr _LVOSetWindowTitles(a6)
move.l a6,a1 Close intuition.library
move.l $4.w,a6
jsr _LVOCloseLibrary(a6)
.fail addq.w #4,sp correct stack
moveq #0,d0 quit with no error
rts
IntName INTNAME